package com.hbnu.test;

import com.hbnu.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyRowMapper implements  RowMapper<Tuser>{
    @Override
    public Tuser mapRow(ResultSet resultSet,int i) throws SQLException{
        int id = resultSet.getInt(columnLabel:"id");
        String name = resultSet.getString(columnLabel:"name");
        String password = resultSet.getString(columnLabel:"password");
        String addr = resultSet.getString(columnLabel:"addr");
        double salary =resultSet.getDouble(columnLabel:"salary");

        return new TUser(id,name,addr,password,salary);

    }
}